package java面向对象.静态属性;

public class Student {
    private String name;
    private int age;
    static private String school;

    public Student(String name, int age, String school) {
        this.name=name;
        this.age=age;
        Student.school =school;


    }
    public String getName() {
        return name;

    }
    public void setName(String name) {
        this.name = name;
    }
    public int getAge() {
        return age;
    }
    public void setAge(int age) {
        this.age = age;
    }
    public String getSchool() {
        return school;
    }
    public static void setSchool(String school) {
        Student.school = school;
    }
    public void show(){
        System.out.println("姓名："+name+"年龄："+age+"学校："+school);
    }
}
